<%- include('../layout/header') %>
<!-- 主题内容 -->
<div class="content">
    <h2>修改图书</h2>
    <hr>
    <div class="form">
        <form class="form-horizontal" action="/book/<%= data._id %>/update"  method="post" enctype="multipart/form-data">
            <div class="form-group">
              <label for="inputEmail3" class="col-sm-2 control-label">书籍名称</label>
              <div class="col-sm-10">
                <input type="text" name="name" class="form-control" id="inputEmail3" value="<%= data.name %>" >
              </div>
            </div>
            <div class="form-group">
              <label for="inputPassword3" class="col-sm-2 control-label">作者</label>
              <div class="col-sm-10">
                <input type="text" name="author" class="form-control" id="inputPassword3" value="<%= data.author %>">
              </div>
            </div>
            <div class="form-group">
                <label for="inputPassword3" class="col-sm-2 control-label">价格</label>
                <div class="col-sm-10">
                  <input type="text" name="price" class="form-control" id="inputPassword3" value="<%= data.price %>">
                </div>
              </div>

            <div class="form-group">
                <label for="inputPassword3" class="col-sm-2 control-label">出版社</label>
                <div class="col-sm-10">
                  <input type="text" name="cbs" class="form-control" id="inputPassword3" value="<%= data.cbs %>">
                </div>
              </div>

            <div class="form-group">
                <label for="inputPassword3" class="col-sm-2 control-label">简介</label>
                <div class="col-sm-10">
                    <textarea class="form-control" name="intro" rows="3"><%= data.intro %></textarea>
                </div>
              </div>

            <div class="form-group">
                <label for="inputPassword3" class="col-sm-2 control-label">封面</label>
                <div class="col-sm-10">
                  <input type="file" name="img"  id="inputPassword3">
                  <img src="<%= data.img %>" width="200" alt="">
                </div>
            </div>
            <hr>
            <div class="form-group">
              <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary">更新图书信息</button>
              </div>
            </div>
          </form>
    </div>
</div>
<%- include('../layout/footer') %>    